package ru.susu.algebra.partition.filter;

import ru.susu.algebra.partition.Partition;
import ru.susu.algebra.partition.PartitionsFacade;

/**
 * @author akargapolov
 * @since: 11.03.2009
 */
public class OnlyFirstAssocPartitionFilter implements IPartitionFilter
{

	@Override
	public boolean checkPartition(Partition p1)
	{
		if (29 == p1.getOrderNumber().intValue())
		{
			System.out.print("");
		}
		Partition p2 = PartitionsFacade.getAssociatedPartition(p1);
		return p1.getOrderNumber().intValue() <= p2.getOrderNumber().intValue();
	}

}
